package ds.dsr.init;

import ds.dsr.log.Logger;
import ds.dsr.server.Server;
import ds.dsr.server.properties.NettyProperties;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @author sunchong
 * @date 2018/4/23
 */
@Component
public class InitServe implements CommandLineRunner {

    int port = NettyProperties.port;

    public void run(String... strings) throws Exception {
        Logger.info("开始监挺服务");
        Server server = new Server(port);
        server.start();
    }
}
